package com.luych.toolbox.common.feign.view.docker.service;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

@ApiModel("网络数据返回")
public class DockerNetworkView {

    @ApiModelProperty("网络ID")
    private String id;
    @ApiModelProperty("名称")
    private String name;
    @ApiModelProperty("驱动")
    private String driver;
    @ApiModelProperty("子网")
    private String subnet;
    @ApiModelProperty("网关")
    private String gateway;
    @ApiModelProperty("创建时间")
    private Date created;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNameSubnet() {
        return this.subnet == null ? this.name : this.name + " (" + this.subnet + ")";
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getSubnet() {
        return subnet;
    }

    public void setSubnet(String subnet) {
        this.subnet = subnet;
    }

    public String getGateway() {
        return gateway;
    }

    public void setGateway(String gateway) {
        this.gateway = gateway;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }
}
